using System;
using System.Threading;
using System.Windows.Forms;

namespace TimeQuest
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            try
            {
                using (MainGame game = new MainGame())
                {
                    game.Run();
                }
            }
            catch (Exception e)
            {
                Thread.Sleep(4800);
                Form f = new Form();
                f.Text = "An Error Occured";


                TextBox t = new TextBox();
                t.Width = f.Width - 20;
                t.Height = f.Height - 40;
                t.WordWrap = true;
                t.ReadOnly = true;
                t.Multiline = true;
                t.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
                f.Controls.Add(t);

                t.Text = "Please copy the text in this box and e-mail to \r\njustin.lee.barker@gmail.com\r\n\r\n           thank you\r\n\r\n\r\n\r\n" + e.Message + e.StackTrace;

                f.StartPosition = FormStartPosition.CenterScreen;
                f.ShowDialog();

            }
        }
    }
}

